
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    1. 判断数据类型

</body>
<script>
    'use strict'
    console.log(a)
    function Fun() {

    }
    var a = 123
    console.log(Object.prototype.toString.call(Fun))
    var arr = [1,2,3,4]

    console.log(Array.prototype.slice.call(arr, 1))

    function curry(fn) {
        var arg = Array.prototype.slice.call(arguments, 1)
        return function() {
            var innerArg = Array.prototype.slice.call(arguments)
            var finalArg = arg.concat(innerArg)
            return fn.apply(null, finalArg)
        }
    }
    function add(num1, num2) {
        return num1 + num2
    }
    var curriedAdd = curry(add, 5, 19)
    console.log(curriedAdd)
    console.log(curriedAdd())
    
    function add (a) {
        return function(b) {
            return a + b
        }
    }
    var a = add (2)
    var i = 0
    var obj = {title: '123'}
    var obj1 = {sex: 1334}
    var obj1 = Object.create(null)
    obj1.name = 'hah'
    console.dir(obj1)
</script>
</html>